﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link href="~/layui/css/layui.css" rel="stylesheet" />
    <script src="~/libs/jquery/jquery.js"></script>
    <link href="~/libs/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <script src="~/layui/layui.js" charset="utf-8"></script>
</head>
<body>
    <table class="table" style="width:700px">
        <tr>
            <td>合同编号</td>
            <td><span id="NumberId"></span></td>
            <td>合同标题</td>
            <td><span id="ContractTitle"></span></td>
        </tr>
        <tr>
            <td>外协单位</td>
            <td><span id="OutsourcingUnit"></span></td>
            <td>外协负责人</td>
            <td><span id="OutsourcingLeader"></span></td>
        </tr>
        <tr>
            <td>线路名称</td>
            <td><span id="Line"></span></td>
            <td>吨运价</td>
            <td><span id="Freightrate"></span></td>
        </tr>
        <tr>
            <td>包车条件吨位</td>
            <td><span id="CharterConditions"></span></td>
            <td>包车金额</td>
            <td><span id="CharterAmount"></span></td>
        </tr>
        <tr>
            <td>签订日期</td>
            <td><span id="SigningDate"></span></td>
            <td>经办人</td>
            <td><span id="Handler"></span></td>
        </tr>
    </table>
    <input type="button" name="name" value="返回" onclick="location.href='/CarryContract/Index'" />
    <script>
        $(function () {
            Edit();
        })
        function Edit() {
            $.ajax({
                url:"/CarryContract/GetCarryById?Id="+@ViewBag.Id,
                type:"get",
                dataType:"json",
                success: function (obj) {
                    $("#ContractTitle").html(obj.contractTitle);
                    $("#OutsourcingUnit").html(obj.outsourcingUnit);
                    $("#OutsourcingLeader").html(obj.outsourcingLeader);
                    $("#Line").html(obj.line);
                    $("#Freightrate").html(obj.freightrate);
                    $("#CharterConditions").html(obj.charterConditions);
                    $("#CharterAmount").html(obj.charterAmount);
                    $("#Handler").html(obj.handler);
                    $("#SigningDate").html(obj.signingDate);
                    $("#ProjectDescription").html(obj.projectDescription);
                    $("#ChangeClause").html(obj.changeClause);
                    $("#NumberId").html(obj.numberId);
                    $("#Enclosure").html(obj.enclosure);
                    $("#CreationTime").html(obj.creationTime);
                    //console.log($("[name=Id]").val());
                }
            })
        }
    </script>

</body>
</html>
